/**
 * @Author: lll
 * @Email:li.lele@vpclub.cn
 * @Date: create in 2020/7/8
 */
package cn.vpclub.admin.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.NotEmpty;
import java.io.Serializable;
import java.util.Date;

@Getter
@Setter
@TableName(value = "article")
public class ArticleEntity implements Serializable {
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    public String id;

    @NotEmpty(message = "文章标题不能为空")
    @TableField(value = "article_title")
    private String articleTitle;

    @NotEmpty(message = "文章内容不能为空")
    @TableField(value = "article_content")
    private String articleContent;

    @NotEmpty(message = "分类不能为空")
    @TableField(value = "tab_content")
    private String tabContent;

    @NotEmpty(message = "情感随机图片不能为空")
    @TableField(value = "random_picture")
    private String randomPicture;

    @TableField(value = "watched")
    private Integer watched;
    @TableField(value = "stared")
    private Integer stared;

    @TableField(value = "createdBy")
    private String createdBy;

    @TableField(value = "hot")
    private Integer hot;

    @TableField(value = "createdTime", fill = FieldFill.INSERT)
    private Date createdTime;
    @TableField(value = "updatedTime", fill = FieldFill.UPDATE)
    private Date updatedTime;
}
